<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.solution.common.config.PublicConfig"%>
<%@ page import="com.solution.admin.home.constants.IndexConstants"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sl" tagdir="/WEB-INF/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String basePath = PublicConfig.ROOT_PATH;
	String imgRootURL = PublicConfig.IMG_ROOT_URL;
	String ossImgZoomWX = PublicConfig.OSS_IMG_ZOOM_WX; //微信图片缩放
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>全部评论</title>
<link rel="stylesheet" type="text/css" href="<%=basePath%>/statics_wx/css/style.css">
<link rel="stylesheet" type="text/css" href="<%=basePath%>/statics_wx/css/main2.css">
<script type="text/javascript" src="<%=basePath%>/statics_wx/js/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>/statics_wx/js/js.js"></script>
<script type="text/javascript" src="<%=basePath%>/statics_wx/js/custom.js"></script>
<script type="text/javascript" src="<%=basePath%>/statics/plugins/layer/layer.js"></script>
<script src="<%=basePath%>/statics/js/webform.js" type="text/javascript"></script>

<script type="text/javascript">
var SystemImgPath = '<%=PublicConfig.IMG_ROOT_URL%>';
var imgRootURL = '<%=PublicConfig.IMG_ROOT_URL%>';
//系统域名 
var rootPath = '<%=basePath%>';
</script>
</head>

<c:set var="rootPath" value="<%=basePath%>"></c:set>
<c:set var="imgRootURL" value="<%=imgRootURL%>"></c:set>
<c:set var="ossImgZoomWX" value="<%=ossImgZoomWX%>"></c:set>

<body style="background: #f3f3f3">
	<%-- 隐藏域 begin --%>
	<input type="hidden" id="sync_page_num" pname="pageNum" value="${pageBean.currentPage }" />
	<input type="hidden" id="sync_num_per_page" pname="numPerPage" value="${pageBean.numPerPage}" />
	<input type="hidden" id="sync_page_count" pname="pageCount" value="${pageBean.pageCount }" />
	
	<input type="hidden" id="shareId" value="${shareId }" />
	<input type="hidden" id="commentId"/>
	<%-- 隐藏域 end --%>
	
	<%-- 评论、回复 --%>
	<div class="add_comment1" id="add_comment" style="display:none">
		<div class="add_comment1_con">
			<p>
				<strong><input id="shareCommentContent" type="text" class="inputstyle1" placeholder="添加评论" /></strong>
				<a href="javascript:void(0);" onclick="publishShareComment(this);">发送</a>
			</p>
		</div>
	</div>
	<div class="add_comment1" id="reply_comment" style="display:none">
		<div class="add_comment1_con">
			<p>
				<strong>
					<input id="parentCommentId" type="hidden" value=""/>
					<input id="parentCommentName" type="hidden" value=""/>
					<input id="replyCommentContent" type="text" class="inputstyle1" placeholder="" />
				</strong>
				<a href="javascript:void(0);" onclick="publishReplyComment(this);">发送</a>
			</p>
		</div>
	</div>
	<div class="header">
		<div class="icon_back">
			<a href="javascript:void(0);" onclick="window.location.href='${rootPath}/wx/share/detail?id=${shareId }'"></a>
		</div>
		<h1>评论</h1>
	</div>
	<div class="headerfixed"></div>
	<div class="allcomment">
		<div class="hd">
			<h3>
				<i></i><span>评论</span>
			</h3>
			<a href="javascript:void(0);"><b><span>共 ${commentQuantity } 条评论</span><i></i></b></a>
		</div>
		<div class="bd">
			<c:choose>
				<c:when test="${not empty commentList}">
					<div class="comment_list">
						<ul id="commentUl">
							<c:forEach items="${commentList }" var="comment">
								<li>
									<div class="boxs2">
										<div class="pic">
											<img src="${imgRootURL }${comment.commentUserHeadImage }" onerror="this.src='${rootPath }/statics/images/default.jpg'" />
										</div>
										<div class="item-info">
											<div class="boxs2_1">
												<h2>${comment.commentNickname }</h2>
												<p>${comment.commentContent }</p>
											</div>
											<div class="boxs2_2">
												<div class="left">
													<p><fmt:formatDate value="${comment.commentTime }"  pattern="yyyy-MM-dd HH:mm:ss" /></p>
												</div>
												<div class="right">
													<b><a href="javascript: doReply('${comment.id }', '${comment.commentNickname }');" class="replybtn" rel="${comment.id }">回复</a></b> 
													<b>
														<c:if test="${comment.isUserLike eq 0 }">
															<a href="javascript:void(0)" onclick="doShareCommentLike(this, ${comment.id})">
																<i></i>
																<span name="commentLikeQuantity">${comment.commentLikeQuantity }</span>
															</a>
														</c:if>
														<c:if test="${comment.isUserLike eq 1 }">
															<a href="javascript:void(0);" class="current">
																<i></i>
																<span name="commentLikeQuantity">${comment.commentLikeQuantity }</span>
															</a>
														</c:if>
													</b>
												</div>
											</div>
											<!-- 评论是否有回复 -->
											<c:if test="${not empty comment.replyList }">
												<div class="boxs2_3">
													<dl>
														<c:forEach items="${comment.replyList }" var="reply">
															<dt>
																<h3>${reply.commentNickname }：${reply.commentContent }</h3>
																<div class="boxs2_2">
																	<div class="left">
																		<p><fmt:formatDate value="${reply.commentTime }"  pattern="yyyy-MM-dd HH:mm:ss" /></p>
																	</div>
																	<div class="right">
																		<b>
																			<a href="javascript: doReply('${comment.id }', '${reply.commentNickname }');" class="replybtn" rel="${reply.id }">回复</a>
																		</b> 
																		<b>
																			<c:if test="${reply.isUserLike eq 0 }">
																				<a href="javascript:void(0)" onclick="doShareCommentLike(this, ${reply.id})">
																					<i></i>
																					<span name="commentLikeQuantity">${reply.commentLikeQuantity }</span>
																				</a>
																			</c:if>
																			<c:if test="${reply.isUserLike eq 1 }">
																				<a href="javascript:void(0);" class="current">
																					<i></i>
																					<span name="commentLikeQuantity">${reply.commentLikeQuantity }</span>
																				</a>
																			</c:if>
																		</b>
																	</div>
																</div>
															</dt>
														</c:forEach>
													</dl>
													<c:if test="${fn:length(comment.replyList) > 3 }">
														<div class="morepart">
															<a href="javacript:void(0)"><span class="a1">共 ${comment.commentReply } 条回复</span>
															<span class="a2">收起所有评论</span><i></i></a>
														</div>
													</c:if>
												</div>
											</c:if>
										</div>
									</div>
								</li>
							</c:forEach>
						</ul>
					</div>
				</c:when>
				<c:otherwise>
					<p>暂无评论</p>
				</c:otherwise>
			</c:choose>
		</div>
	</div>
	<script src="<%=basePath%>/js/wx/share/comment_list.js" type="text/javascript" charset="utf-8"></script>
</body>
</html>